#include <iostream>
using namespace std;
int main()
{
	char a;
	int cnt = 0;
	cin >> a;
	while(a!='0')
	{
		if('a'<=a&&a<='z') cnt++;
		cin >> a;
	}
	if(cnt==0)
	{
		cout << "NO";
	}
	else cout << cnt;
	return 0;
}

